{% extends 'layout.html' %}

{% block content %}

<div class="login">
    {% if flash %}
        <div class="alert bg-red">
            {{ flash }}
        </div>
    {% endif %}
    
    <h3>Change password</h3>
    
    <p style="margin: 1em 0 2em 0;">
        If the username and email are valid, you should receive a new message soon.
        Insert the secret code and your new password below.
    </p>
    
    <form action="{{ url ('validate_new_password') }}" method="post">
        <input type="hidden" name="token" value="" />
        <p>
            <input type="text" name="username" placeholder="Username" class="form-control" required />
        </p>
        <p>
            <input type="text" name="email" placeholder="Email" class="form-control" required />
        </p>
        <p>
            <input type="password" name="password" placeholder="New password" class="form-control" required />
        </p>
        <p>
            <input type="password" name="token" placeholder="Secret code" class="form-control" required />
        </p>
        
        <div>
            <input type="submit" class="button button_info" value="Change password" />
        </div>
    </form>
    
</div>

{% endblock %}




